home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADTM.IN_ / oemnadtm.inf
INI File  |  1996-07-18  |  25KB  |  631 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     MCA
  5. [Options]
  6.     IBMTOKMC
  7.     IBMTOKA
  8. [FileConstants]
  9. UtilityInf      = "UTILITY.INF"
  10. subroutineinf   = "SUBROUTN.INF"
  11. SoftwareType    = "driver"
  12. Exit_Code       = 0
  13. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  14. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  15. IBMTOKMC_1BYTE  = 1
  16. IBMTOKMC_2BYTE  = 224
  17. IBMTOKMC_ID     = 57345
  18. IBMTOKA_1BYTE  = 0
  19. IBMTOKA_2BYTE  = 224
  20. IBMTOKA_ID     = 57344
  21. Manufacturer    = "Microsoft"
  22. ProductMajorVersion     = "4"
  23. ProductMinorVersion     = "0"
  24. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  25. ProductSoftwareName     = "IbmTok"
  26. ProductSoftwareImagePath = "\SystemRoot\system32\drivers\ibmtok.sys"
  27. NetRuleSoftwareType     = "ibmtokSys ndisDriver ibmtokDriver"
  28. NetRuleSoftwareUse      = $(SoftwareType)
  29. NetRuleSoftwareBindForm = """IBMTokSys"" yes no container"
  30. NetRuleSoftwareClass    = {"ibmtokriver basic"}
  31. NetRuleSoftwareBindable = {"ibmtokDriver ibmtokAdapter non exclusive 100",+
  32.                            "ibmtokDriver ibmtokmcAdapter non exclusive 100"}
  33. ProductHardwareName     = "IbmTokMC"
  34. NetRuleHardwareType     = "ibmtokmc ibmtokmcAdapter"
  35. NetRuleHardwareBindForm = " yes yes container"
  36. NetRuleHardwareClass    = {"ibmtokmcAdapter basic"}
  37. ProductOpSupport     = 134 
  38. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  39. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  40. [GeneralConstants]
  41. from      = ""
  42. to        = ""
  43. ExitCodeOk     = 0
  44. ExitCodeCancel = 1
  45. ExitCodeFatal  = 2
  46. KeyNull         = ""
  47. MAXIMUM_ALLOWED   = 33554432
  48. RegistryErrorIndex = NO_ERROR
  49. KeyProduct      = ""
  50. KeyParameters   = ""
  51. TRUE            = 1
  52. FALSE           = 0
  53. NoTitle            = 0
  54. ExitState   = "Active"
  55. OldVersionExisted = $(FALSE)
  56. DriverPath      = $(!STF_NTPATH)\drivers
  57. [date]
  58.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  59. [Identify]
  60.     read-syms Identification
  61.     set Status     = STATUS_SUCCESSFUL
  62.     set Identifier = $(OptionType)
  63.     set Media      = #("Source Media Descriptions", 1, 1)
  64.     Return $(Status) $(Identifier) $(Media)
  65. [ReturnOptions]
  66.     set Status        = STATUS_FAILED
  67.     set OptionList     = {}
  68.     set OptionTextList = {}
  69.     set LanguageList = ^(LanguagesSupported, 1)
  70.     Ifcontains(i) $($0) in $(LanguageList)
  71.         ifstr(i) $($1) == ""
  72.            goto returnoptions
  73.         endif
  74.         set PlatformList = ^(PlatformsSupported, 1)
  75.         Ifcontains(i) $($1) in $(PlatformList)
  76.            goto returnoptions
  77.         else
  78.            set Status = STATUS_NOTSUPPORTED
  79.            goto finish_ReturnOptions
  80.         endif
  81.     else
  82.         set Status = STATUS_NOLANGUAGE
  83.         goto finish_ReturnOptions
  84.     endif
  85. returnoptions = +
  86.     set OptionList     = ^(Options, 1)
  87.     set OptionTextList = ^(OptionsText$($0), 1)
  88.     set Status         = STATUS_SUCCESSFUL
  89. finish_ReturnOptions = +
  90.     Return $(Status) $(OptionList) $(OptionTextList)
  91. [InstallOption]
  92.     set Option   = $($1)
  93.     set SrcDir   = $($2)
  94.     set AddCopy  = $($3)
  95.     set DoCopy   = $($4)
  96.     set DoConfig = $($5)
  97.     set LanguageList = ^(LanguagesSupported, 1)
  98.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  99.         Return STATUS_NOLANGUAGE
  100.     endif
  101.     Debug-Output "OEMNADTM.INF: STF_CWDIR is: "$(!STF_CWDIR)
  102.     Debug-Output "OEMNADTM.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  103.     set-subst LF = "\n"
  104.     read-syms GeneralConstants
  105.     read-syms FileConstants
  106.     read-syms DialogConstants$(!STF_LANGUAGE)
  107.     read-syms FileConstants$(!STF_LANGUAGE)
  108.     detect date
  109.     set-title  $(FunctionTitle)
  110.     set to   = Begin
  111.     set from = Begin
  112.     set CommonStatus = STATUS_SUCCESSFUL
  113.     EndWait
  114. Begin = +
  115.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  116.         set StartLabel = removeadapter
  117.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  118.         set StartLabel = UpgradeSoftware
  119.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  120.         set StartLabel = bindingadapter
  121.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  122.         set CommonStatus = STATUS_REBOOT
  123.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  124.             Debug-Output "Cannot configure the ibm token ring driver software."
  125.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  126.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  127.                 Debug-Output "ShellCode error: cannot get an error string."
  128.                 goto ShellCodeError
  129.             endif
  130.             set Error = $($R0)
  131.             set from = end
  132.             set to = end
  133.             goto nonfatalinfo
  134.         endif
  135.         set StartLabel = configureadapter
  136.     else
  137.         set StartLabel = installadapter
  138.         set OEM_ABANDON_OPTIONS = {}
  139.         set OEM_ABANDON_SOFTWARE = FALSE
  140.         set OEM_ABANDON_ON = TRUE
  141.     endif
  142.     set from = $(fatal)
  143.     set to = $(fatal)
  144.     goto $(StartLabel)
  145. installadapter = +
  146.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  147.     Ifstr $(KeyProduct) != $(KeyNull)
  148.         CloseRegKey $(KeyProduct)
  149.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  150.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  151.                $(ProductVersion)
  152.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  153.                Debug-Output "ShellCode error: cannot get an error string."
  154.                goto ShellCodeError
  155.            endif
  156.            goto end
  157.         else
  158.            Shell $(UtilityInf), CardExistedDlg
  159.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  160.                Debug-Output "ShellCode error: cannot get an error string."
  161.                goto ShellCodeError
  162.            endif
  163.            ifstr(i) $($R1) != "OK"
  164.                Set CommonStatus = STATUS_USERCANCEL
  165.                goto end
  166.            endif
  167.            set OldVersionExisted = $(TRUE)
  168.         endif
  169.     endif
  170.     goto nextstep
  171. configureadapter = +
  172.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetCardKey
  173.     ifstr(i) $(NetCardKey) == ""
  174.         set CommonStatus = STATUS_USERCANCEL
  175.         goto successful
  176.     endif
  177.     GetRegValue $(NetCardKey) "ServiceName" ServiceInfo
  178.     set ServiceName = *($(ServiceInfo),4)
  179.     CloseRegKey $(NetCardKey)
  180.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  181.     ifstr(i) $(ParamKey) != ""
  182.         GetRegValue $(ParamKey),"NetworkAddress", NetworkAddressInfo
  183.         set NetworkAddress = *($(NetworkAddressInfo), 4)
  184.         read-syms FileDependentDlg$(!STF_LANGUAGE)
  185.         ui start "NetworkAddress"
  186.         ifstr(i) $(DLGEVENT) == "CONTINUE"
  187.             set NetworkAddress = *($(EditTextOut),1)
  188.             SetRegValue $(ParamKey) {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)}
  189.             ui pop 1
  190.         else
  191.             set CommonStatus = STATUS_USERCANCEL
  192.             ui pop 1
  193.         endif
  194.         CloseRegKey $(ParamKey)
  195.     endif
  196.     goto successful
  197. nextstep = +
  198.     StartWait
  199. installproduct = +
  200.     ifstr(i) $(Option) == "IBMTOKMC"
  201.         set NETCARD_ID = $(IBMTOKMC_ID)
  202.         Shell $(UtilityInf), MCAFindBus, $(IBMTOKMC_1BYTE), $(IBMTOKMC_2BYTE)
  203.     else
  204.         set NETCARD_ID = $(IBMTOKA_ID)
  205.         Shell $(UtilityInf), MCAFindBus, $(IBMTOKA_1BYTE), $(IBMTOKA_2BYTE)
  206.     endif
  207.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.         goto ShellCodeError
  209.     endif
  210.     ifstr $($R0) != "NO_ERROR"
  211.         set Error = $($R0)
  212.         goto fatal
  213.     endif
  214.     ifstr(i) $($R1) == {}
  215.         set Error = $(CANNOT_FIND_ANY_CARD)
  216.         set CommonStatus = STATUS_USERCANCEL
  217.         set from = "end"
  218.         goto nonfatal
  219.     endif
  220.     set AdapterList = $($R1)
  221.     ifint $(OldVersionExisted) == $(FALSE)
  222.         ifstr(i) $(!NTN_InstallMode) == "install"
  223.            Ifstr(i) $(DoCopy) == "YES"
  224.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  225.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  226.                   Goto ShellCodeError
  227.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  228.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  229.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  230.                       goto ShellCodeError
  231.                   endif
  232.                   set Error = $($R0)
  233.                   Goto fatal
  234.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  235.                   Goto successful
  236.               Endif
  237.               Set SrcDir = $($R1)
  238.            Endif
  239.            install "Install-Option"
  240.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  241.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  242.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  243.                   goto ShellCodeError
  244.               endif
  245.               set Error = $($R0)
  246.               goto fatal
  247.            endif
  248.         endif
  249.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  250.             $(ProductSoftwareName), +
  251.             $(ProductSoftwareName), +
  252.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  253.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  254.             $(NetEventDLL)
  255.         Set OEM_ABANDON_SOFTWARE = TRUE
  256.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  257.             goto ShellCodeError
  258.         endif
  259.         set RegistryErrorIndex = $($R0)
  260.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  261.             EndWait
  262.             CloseRegKey $($R1)
  263.             CloseRegKey $($R2)
  264.             CloseRegKey $($R3)
  265.             CloseRegKey $($R4)
  266.             CloseRegKey $($R5)
  267.             goto fatalregistry
  268.         endif
  269.         Set SoftProductKey      = $($R1)
  270.         Set SoftNetRuleKey      = $($R2)
  271.         Set SoftServiceKey      = $($R3)
  272.         Set SoftParameterKey    = $($R4)
  273.         Set SoftLinkageKey      = $($R5)
  274.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  275.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  276.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  277.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  278.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  279.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  280.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  281.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  282.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  283.             goto ShellCodeError
  284.         endif
  285.         set RegistryErrorIndex = $($R0)
  286.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  287.             EndWait
  288.             CloseRegKey $(SoftProductKey)
  289.             CloseRegKey $(SoftNetRuleKey)
  290.             CloseRegKey $(SoftServiceKey)
  291.             CloseRegKey $(SoftParameterKey)
  292.             CloseRegKey $(SoftLinkageKey)
  293.             goto fatalregistry
  294.         endif
  295.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  296.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  297.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  298.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  299.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  300.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  301.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  302.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  303.             goto ShellCodeError
  304.         endif
  305.         set RegistryErrorIndex = $($R0)
  306.         CloseRegKey $(SoftProductKey)
  307.         CloseRegKey $(SoftNetRuleKey)
  308.         CloseRegKey $(SoftServiceKey)
  309.         CloseRegKey $(SoftParameterKey)
  310.         CloseRegKey $(SoftLinkageKey)
  311.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  312.             EndWait
  313.             goto fatalregistry
  314.         endif
  315.     endif
  316.     ForListDo $(AdapterList)
  317.         set BusNum = *($($),1)
  318.         set SlotNum = *($($),2)
  319.         Debug-Output $(BusNum)
  320.         Debug-Output $(SlotNum)
  321.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  322.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  323.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  324.             goto ShellCodeError
  325.         endif
  326.         ifstr $($R0) != "NO_ERROR"
  327.             set Error = $($R0)
  328.             goto fatal
  329.         endif
  330.         ifstr(i) $($R1) != "YES"
  331.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  332.                 ifint $($R4) != -1
  333.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  334.                 endif
  335.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  336.                     goto ShellCodeError
  337.                 endif
  338.                 set RegistryErrorIndex = $($R0)
  339.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  340.                     EndWait
  341.                     CloseRegKey $($R1)
  342.                     CloseRegKey $($R2)
  343.                     CloseRegKey $($R3)
  344.                     goto fatalregistry
  345.                 endif
  346.                 Set HardNetCardKey      = $($R1)
  347.                 Set HardNetRuleKey      = $($R2)
  348.                 Set HardParameterKey    = $($R3)
  349.                 set AdapterNumber       = $($R4)
  350.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  351.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  352.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  353.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  354.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  355.                                    {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  356.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  357.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  358.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.                     goto ShellCodeError
  360.                 endif
  361.                 ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  362.                     NetworkAddress = ""
  363.                     goto WriteNetworkAddr
  364.                 endif
  365.                 read-syms FileDependentDlg$(!STF_LANGUAGE)
  366.                 ui start "NetworkAddress"
  367.                 set NetworkAddress = *($(EditTextOut),1)
  368. WriteNetworkAddr = +
  369.                 set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  370.                                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),2},+
  371.                                 {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  372.                                 {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  373.                                 {BusType,$(NoTitle),$(!REG_VT_DWORD),3},+
  374.                                 {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  375.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  376.                 ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  377.                     Shell $(UtilityInf),AddDefaultNetCardParameters,$(HardParameterKey)
  378.                 endif
  379.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  380.                     goto ShellCodeError
  381.                 endif
  382.                 set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  383.                 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  384.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  385.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  386.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  387.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  388.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  389.                 CloseRegKey $(HardNetCardKey)
  390.                 CloseRegKey $(HardNetRuleKey)
  391.                 CloseRegKey $(HardParameterKey)
  392.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  393.                     goto ShellCodeError
  394.                 endif
  395.         endif
  396.     EndForListDo
  397.     goto writeparameters
  398. writeparameters = +
  399.     EndWait
  400.     goto successful
  401. bindingadapter =+
  402.     set Error = "Binding: Sorry, not yet implemented."
  403.     goto fatal
  404. removeadapter = +
  405.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  406.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  407.             $(ProductSoftwareName)
  408.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  409.             Debug-Output "ShellCode error"
  410.             goto ShellCodeError
  411.         endif
  412.         set RegistryErrorIndex = $($R0)
  413.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  414.             goto fatalregistry
  415.         endif
  416.     else
  417.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  418.             $(ProductSoftwareName), $(!NTN_RegBase)
  419.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  420.             Debug-Output "ShellCode error"
  421.             goto ShellCodeError
  422.         endif
  423.         set RegistryErrorIndex = $($R0)
  424.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  425.             goto fatalregistry
  426.         endif
  427.     endif
  428.     goto end
  429. UpgradeSoftware = +
  430.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  431.     Ifstr $(KeyProduct) != $(KeyNull)
  432.         install "Install-Update"
  433.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  434.             goto fatal
  435.         endif
  436.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  437.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  438.         CloseRegKey $(KeyProduct)
  439.     else
  440.         goto fatalregistry
  441.     endif
  442.     set iSearch = 1
  443. nextnetcard = +
  444.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  445.     set KeyNetcard = $($R0)
  446.     set iSearch = $($R1)
  447.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  448.     Ifstr $(KeyNetcard) != $(KeyNull)
  449.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  450.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  451.         CloseRegKey $(KeyNetcard)
  452.         goto nextnetcard
  453.     Endif
  454.     goto end
  455. successful = +
  456.     goto end
  457. abandon = +
  458.     ForListDo $(OEM_ABANDON_OPTIONS)
  459.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  460.             $(ProductSoftwareName), $($)
  461.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  462.             Debug-Output "ShellCode error"
  463.             goto ShellCodeError
  464.         endif
  465.         set RegistryErrorIndex = $($R0)
  466.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  467.             goto fatalregistry
  468.         endif
  469.     EndForListDo
  470.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  471.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  472.             $(ProductSoftwareName), FALSE
  473.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.             Debug-Output "ShellCode error"
  475.             goto ShellCodeError
  476.         endif
  477.         set RegistryErrorIndex = $($R0)
  478.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  479.             goto fatalregistry
  480.         endif
  481.     endif
  482.     goto end
  483. warning = +
  484.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  485.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  486.         goto ShellCodeError
  487.     endif
  488.     ifstr(i) $($R1) == "OK"
  489.         goto $(to)
  490.     else-ifstr(i) $($R1) == "CANCEL"
  491.         goto $(from)
  492.     else
  493.         goto "end"
  494.     endif
  495. nonfatalinfo = +
  496.     Set CommonStatus = STATUS_USERCANCEL
  497.     Set Severity = STATUS
  498.     goto nonfatalmsg
  499. nonfatal = +
  500.     Set Severity = NONFATAL
  501.     goto nonfatalmsg
  502. nonfatalmsg = +
  503.     ifstr(i) $(Error) == ""
  504.         Set Severity = NONFATAL
  505.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  506.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  507.             goto ShellCodeError
  508.         endif
  509.         set Error = $($R0)
  510.     endif
  511.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  512.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  513.         goto ShellCodeError
  514.     endif
  515.     ifstr(i) $($R1) == "OK"
  516.         goto $(from)
  517.     else
  518.         goto "end"
  519.     endif
  520. fatalregistry = +
  521.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  522.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  523.         goto ShellCodeError
  524.     endif
  525.     set Error = $($R0)
  526.     goto fatal
  527. fatal = +
  528.     ifstr(i) $(Error) == ""
  529.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  530.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.             goto ShellCodeError
  532.         endif
  533.         set Error = $($R0)
  534.     endif
  535.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  536.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.         goto ShellCodeError
  538.     endif
  539.     goto setfailed
  540. ShellCodeError = +
  541.     set DlgType      = "MessageBox"
  542.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  543.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  544.     set STF_MB_TYPE  = 1
  545.     set STF_MB_ICON  = 3
  546.     set STF_MB_DEF   = 1
  547.     ui start "Error Message"
  548.     goto setfailed
  549. setfailed = +
  550.     set CommonStatus = STATUS_FAILED
  551.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  552.         set OEM_ABANDON_ON = FALSE
  553.         goto abandon
  554.     endif
  555.     goto end
  556. end = +
  557.     goto term
  558. term = +
  559.     Return $(CommonStatus)
  560. [Install-Option]
  561.     set STF_VITAL = ""
  562.     ifstr(i) $(AddCopy) == "YES"
  563.         AddSectionFilesToCopyList Files-IBMTOKMC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  564.     endif
  565.     ifstr(i) $(DoCopy) == "YES"
  566.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  567.        CopyFilesInCopyList
  568.     endif
  569.     ifstr(i) $(DoConfig) == "YES"
  570.     endif
  571.     Exit
  572. [Install-Update]
  573.    set STF_VITAL        = ""
  574.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  575.    AddSectionFilesToCopyList Files-IBMTOKMC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  576.    exit
  577. [Source Media Descriptions]
  578.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  579. [Signature]
  580.     FileType = MICROSOFT_FILE
  581. [GetSignature]
  582.     read-syms Signature
  583.     return $(FileType)
  584. [ProductType]
  585. STF_PRODUCT  = LanmanNT
  586. STF_PLATFORM = I386
  587. [Files-Inf]
  588. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  589. [Files-IBMTOKMC]
  590. 1,IBMTOK.SYS , SIZE=34416
  591. [LanguagesSupported]
  592.     ENG
  593. [OptionsTextENG]
  594.     IBMTOKMC     = "IBM Token Ring 4/16 Adapter /A"
  595.     IBMTOKA      = "IBM Token Ring Adapter /A"
  596. [FileConstantsENG]
  597. ProCaption   = "Windows NT Setup"
  598. ProCancel    = "Cancel"
  599. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  600.                "Are you sure you want to cancel copying files?"
  601. ProCancelCap = "Network Setup Message"
  602. ProText1     = "Copying:"
  603. ProText2     = "To:"
  604. FunctionTitle   = "IBM Token Ring Adapter Card Setup"
  605. ProductSoftwareDescription      = "IBM Token Ring Adapter Driver"
  606. ProductHardwareIBMTOKADescription      = "IBM Token Ring Adapter /A"
  607. ProductHardwareIBMTOKMCDescription     = "IBM Token Ring 4/16 Adapter /A"
  608. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  609. ProductSoftwareTitle    = "IBM Token Ring Adapter Driver"
  610. ProductHardwareIBMTOKATitle     = "IBM Token Ring Adapter /A"
  611. ProductHardwareIBMTOKMCTitle    = "IBM Token Ring 4/16 Adapter /A"
  612. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  613. ShellCodeErrorText      = "Shell Code Error."
  614. [DialogConstantsENG]
  615. Help        = "&Help"
  616. Exit        = "Cancel"
  617. OK          = "OK"
  618. HelpContext = ""
  619. Continue    = "C&ontinue"
  620. Cancel      = "C&ancel"
  621. [FileDependentDlgENG]
  622. Edit1Label = "&Network Address:"
  623. DlgType = "Edit"
  624. DlgTemplate = "NETWORK_NUMBER"
  625. Caption = $(FunctionTitle)
  626. HelpContext = $(!IDH_DB_OEMNADTM_INS)
  627. EditTextLim = 17
  628. EditTextIn  = $(NetworkAddress)
  629. EditFocus   = "ALL"
  630. RCCtlFocusOn = 403
  631.